package com.hopes.bizz.stop.risk.alarm.support;

import com.baomidou.mybatisplus.extension.service.IService;
import com.google.common.collect.Maps;
import com.hopes.bizz.stop.risk.alarm.service.LineAlarmBrokenService;
import com.hopes.bizz.stop.risk.alarm.service.LineAlarmExceptionService;
import com.hopes.bizz.stop.risk.alarm.service.LineAlarmOverproofService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import java.util.Map;

/**
 * @author: ljh
 * @create: 2024/2/22
 */
@Component
@RequiredArgsConstructor
public class AlarmServiceFactory {

    private final LineAlarmOverproofService lineAlarmOverproofService;
    private final LineAlarmBrokenService lineAlarmBrokenService;
    private final LineAlarmExceptionService lineAlarmExceptionService;

    public static final Map<String, IService>  map =  Maps.newHashMapWithExpectedSize(3);

    @PostConstruct
    public void init(){
        map.put("overproofService",lineAlarmOverproofService);
        map.put("brokenService",lineAlarmBrokenService);
        map.put("exceptionService",lineAlarmExceptionService);
    }
}
